#pragma once


class CBitmapRender
{
public:
	CBitmapRender(CDC *pDC, CBitmap *pBitmap);
	~CBitmapRender(void);

	void Draw(int xDest, int yDest, int nDestWidth, int nDestHeight, int xSrc, int ySrc, BOOL bTransparent = FALSE, COLORREF clrTranparent = 0);

	void HorizontalStretch(const CRect& rectDest, const CRect& rectSource);
	void VerticalStretch(const CRect& rectDest, const CRect& rectSource);
	void StretchDraw(const CRect& rectDest, const CRect& rectSource, BOOL bVertical);

	void FullStretch(const CRect& rectDest, const CRect& rectSource);
	void BorderStretch(const CRect& rectDest, const CRect& rectSource);
	void BorderStretch(const CRect& rectDest, const CRect& rectSource, COLORREF clrFillColor);
private:
	CDC *m_pDC;
	CBitmap *m_pBitmap;
};
